<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>0.8.2 API documentation: image.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo-mini.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">0.8.2 API documentation
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_934f46a345653ef2b3014a1b37a162c1.html">G:</a></li><li class="navelem"><a class="el" href="dir_98f7f9d41f9d3029bd68cf237526a774.html">Source</a></li><li class="navelem"><a class="el" href="dir_9344afb825aed5e2f5be1d2015dde43c.html">G-Truc</a></li><li class="navelem"><a class="el" href="dir_b73546165ac7e018753d96ca90d34595.html">gli</a></li><li class="navelem"><a class="el" href="dir_ae6bff3f3cf3c65a1db429f9020bb7b3.html">gli</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">image.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00037.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;./core/storage_linear.hpp&quot;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="keyword">namespace </span><a class="code" href="a00074.html">gli</a></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;{</div>
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="a00003.html">   11</a></span>&#160;        <span class="keyword">class </span><a class="code" href="a00003.html">image</a></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;        {</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        <span class="keyword">private</span>:</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;                <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00013.html">texture1d</a>;</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;                <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00015.html">texture2d</a>;</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;                <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00017.html">texture3d</a>;</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;                <span class="keyword">typedef</span> <span class="keywordtype">size_t</span> size_type;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;                <span class="keyword">typedef</span> <a class="code" href="a00074.html#a387137c43ed9616d39ba90e890d181eb">gli::format</a> <a class="code" href="a00074.html#a387137c43ed9616d39ba90e890d181eb">format_type</a>;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;                <span class="keyword">typedef</span> storage_linear::extent_type extent_type;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;                <span class="keyword">typedef</span> storage_linear::data_type data_type;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;                <a class="code" href="a00003.html#ab4f40c94d3427e415d291c68d3e67cfa">image</a>();</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;                <span class="keyword">explicit</span> <a class="code" href="a00003.html#ab4f40c94d3427e415d291c68d3e67cfa">image</a>(format_type Format, extent_type <span class="keyword">const</span>&amp; Extent);</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;                <span class="keyword">explicit</span> <a class="code" href="a00003.html#ab4f40c94d3427e415d291c68d3e67cfa">image</a>(<a class="code" href="a00003.html">image</a> <span class="keyword">const</span>&amp; Image, format_type Format);</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;                <span class="keywordtype">bool</span> <a class="code" href="a00003.html#ac6e61de369e994009e36f344f99c15ad">empty</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;                format_type <a class="code" href="a00003.html#ad94928ca00873970455c1fb2d3c03fd8">format</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;                extent_type <a class="code" href="a00003.html#a4c9de4b32898ed383505745972d6c009">extent</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;                size_type <a class="code" href="a00003.html#a503ab01f6c0142145d3434f6924714e7">size</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;                <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;                size_type <a class="code" href="a00003.html#a503ab01f6c0142145d3434f6924714e7">size</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;                <span class="keywordtype">void</span>* <a class="code" href="a00003.html#a3f2c67dc864c6b6e705710853b5568ef">data</a>();</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;                <span class="keywordtype">void</span> <span class="keyword">const</span>* <a class="code" href="a00003.html#a3f2c67dc864c6b6e705710853b5568ef">data</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;                <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;                genType* <a class="code" href="a00003.html#a3f2c67dc864c6b6e705710853b5568ef">data</a>();</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;                genType <span class="keyword">const</span>* <a class="code" href="a00003.html#a3f2c67dc864c6b6e705710853b5568ef">data</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;                <span class="keywordtype">void</span> <a class="code" href="a00003.html#ac8bb3912a3ce86b15842e79d0b421204">clear</a>();</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;                <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;                <span class="keywordtype">void</span> <a class="code" href="a00003.html#ac8bb3912a3ce86b15842e79d0b421204">clear</a>(genType <span class="keyword">const</span>&amp; Texel);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                genType <a class="code" href="a00003.html#a2c04da2a2b96b59710315218eae1bf8b">load</a>(extent_type <span class="keyword">const</span>&amp; TexelCoord);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                <span class="keyword">template</span> &lt;<span class="keyword">typename</span> genType&gt;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;                <span class="keywordtype">void</span> <a class="code" href="a00003.html#a0d2a0cda41c9697b915f4c176ad77ef3">store</a>(extent_type <span class="keyword">const</span>&amp; TexelCoord, genType <span class="keyword">const</span>&amp; Data);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <span class="keyword">private</span>:</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                <span class="keyword">explicit</span> <a class="code" href="a00003.html#ab4f40c94d3427e415d291c68d3e67cfa">image</a>(</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;                        std::shared_ptr&lt;storage_linear&gt; Storage,</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                        format_type Format,</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                        size_type BaseLayer,</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;                        size_type BaseFace,</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;                        size_type BaseLevel);</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                std::shared_ptr&lt;storage_linear&gt; Storage;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;                format_type <span class="keyword">const</span> Format;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;                size_type <span class="keyword">const</span> BaseLevel;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;                data_type* Data;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;                size_type <span class="keyword">const</span> Size;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;                data_type* compute_data(size_type BaseLayer, size_type BaseFace, size_type BaseLevel);</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;                size_type compute_size(size_type Level) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        };</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;}<span class="comment">//namespace gli</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="preprocessor">#include &quot;./core/image.inl&quot;</span></div>
<div class="ttc" id="a00003_html_ab4f40c94d3427e415d291c68d3e67cfa"><div class="ttname"><a href="a00003.html#ab4f40c94d3427e415d291c68d3e67cfa">gli::image::image</a></div><div class="ttdeci">image()</div><div class="ttdoc">Create an empty image instance. </div></div>
<div class="ttc" id="a00003_html_ad94928ca00873970455c1fb2d3c03fd8"><div class="ttname"><a href="a00003.html#ad94928ca00873970455c1fb2d3c03fd8">gli::image::format</a></div><div class="ttdeci">format_type format() const </div><div class="ttdoc">Return the image instance format. </div></div>
<div class="ttc" id="a00074_html_a387137c43ed9616d39ba90e890d181eb"><div class="ttname"><a href="a00074.html#a387137c43ed9616d39ba90e890d181eb">gli::format</a></div><div class="ttdeci">format</div><div class="ttdoc">Texture data format. </div><div class="ttdef"><b>Definition:</b> <a href="a00033_source.html#l00012">format.hpp:12</a></div></div>
<div class="ttc" id="a00015_html"><div class="ttname"><a href="a00015.html">gli::texture2d</a></div><div class="ttdoc">2d texture </div><div class="ttdef"><b>Definition:</b> <a href="a00065_source.html#l00012">texture2d.hpp:12</a></div></div>
<div class="ttc" id="a00003_html"><div class="ttname"><a href="a00003.html">gli::image</a></div><div class="ttdoc">Image, representation for a single texture level. </div><div class="ttdef"><b>Definition:</b> <a href="a00037_source.html#l00011">image.hpp:11</a></div></div>
<div class="ttc" id="a00003_html_a0d2a0cda41c9697b915f4c176ad77ef3"><div class="ttname"><a href="a00003.html#a0d2a0cda41c9697b915f4c176ad77ef3">gli::image::store</a></div><div class="ttdeci">void store(extent_type const &amp;TexelCoord, genType const &amp;Data)</div><div class="ttdoc">Store the texel located at TexelCoord coordinates. </div></div>
<div class="ttc" id="a00003_html_a2c04da2a2b96b59710315218eae1bf8b"><div class="ttname"><a href="a00003.html#a2c04da2a2b96b59710315218eae1bf8b">gli::image::load</a></div><div class="ttdeci">genType load(extent_type const &amp;TexelCoord)</div><div class="ttdoc">Load the texel located at TexelCoord coordinates. </div></div>
<div class="ttc" id="a00017_html"><div class="ttname"><a href="a00017.html">gli::texture3d</a></div><div class="ttdoc">3d texture </div><div class="ttdef"><b>Definition:</b> <a href="a00067_source.html#l00012">texture3d.hpp:12</a></div></div>
<div class="ttc" id="a00003_html_ac8bb3912a3ce86b15842e79d0b421204"><div class="ttname"><a href="a00003.html#ac8bb3912a3ce86b15842e79d0b421204">gli::image::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdoc">Clear the entire image storage_linear with zeros. </div></div>
<div class="ttc" id="a00003_html_a503ab01f6c0142145d3434f6924714e7"><div class="ttname"><a href="a00003.html#a503ab01f6c0142145d3434f6924714e7">gli::image::size</a></div><div class="ttdeci">size_type size() const </div><div class="ttdoc">Return the memory size of an image instance storage_linear in bytes. </div></div>
<div class="ttc" id="a00013_html"><div class="ttname"><a href="a00013.html">gli::texture1d</a></div><div class="ttdoc">1d texture </div><div class="ttdef"><b>Definition:</b> <a href="a00063_source.html#l00012">texture1d.hpp:12</a></div></div>
<div class="ttc" id="a00003_html_a3f2c67dc864c6b6e705710853b5568ef"><div class="ttname"><a href="a00003.html#a3f2c67dc864c6b6e705710853b5568ef">gli::image::data</a></div><div class="ttdeci">void * data()</div><div class="ttdoc">Return a pointer to the beginning of the image instance data. </div></div>
<div class="ttc" id="a00074_html"><div class="ttname"><a href="a00074.html">gli</a></div><div class="ttdoc">Namespace where all the classes and functions provided by GLI are exposed. </div><div class="ttdef"><b>Definition:</b> <a href="a00020_source.html#l00006">clear.hpp:6</a></div></div>
<div class="ttc" id="a00003_html_a4c9de4b32898ed383505745972d6c009"><div class="ttname"><a href="a00003.html#a4c9de4b32898ed383505745972d6c009">gli::image::extent</a></div><div class="ttdeci">extent_type extent() const </div><div class="ttdoc">Return the dimensions of an image instance: width, height and depth. </div></div>
<div class="ttc" id="a00003_html_ac6e61de369e994009e36f344f99c15ad"><div class="ttname"><a href="a00003.html#ac6e61de369e994009e36f344f99c15ad">gli::image::empty</a></div><div class="ttdeci">bool empty() const </div><div class="ttdoc">Return whether the image instance is empty, no storage_linear or description have been assigned to th...</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
